import request from '@/utils/request'

// 查询试卷列表
export function testPaperList (data) {
  return request({
    url: '/palnt/paper/list',
    method: 'get',
    params: data
  })
}

// 新增试卷
export function addTestPaper (data) {
  return request({
    url: '/palnt/paper',
    method: 'post',
    data: data
  })
}

// 修改试卷
export function updateTestPaper (data) {
  return request({
    url: '/palnt/paper',
    method: 'put',
    data: data
  })
}

// 删除试卷
export function delTestPaper (ids) {
  return request({
    url: '/palnt/paper/' + ids,
    method: 'delete'
  })
}


// 获取试卷详情
export function getTestPaperDetail (id) {
  return request({
    url: '/palnt/paper/' + id,
    method: 'get'
  })
}

// 随机获取单项试题
export function getRandomQuestion (data) {
  return request({
    url: '/palnt/paper/random',
    method: 'get',
    params: data
  })
}